$:.unshift File.dirname(__FILE__)
require File.dirname(__FILE__) + '/hero_lingo/music'



Fixnum.class_eval do
  
  def Fixnum.current_frets
    Fixnum.clear_frets unless @@current_frets
    @@current_frets
  end
  
  def [](*args)
    if args.kind_of? Array then
      Fixnum.current_frets << {:number => self, :buttons => args}
    else
      super args
    end  
  end
  
  def Fixnum.clear_frets
    @@current_frets=[]
  end
  
  def frets
    'frets'
  end
end


module HeroLingo  
  def self.new_music (music_data,  &fret_sequence)
    Music.new music_data, &fret_sequence
  end
end